package com.crm.service.impl.returnMoney;

import com.crm.dao.mapper.customMapper.returnMoneyManagerCustomMapper.ModifyRoyaltyStatusCustomMapper;
import com.crm.dao.mapper.returnMoney.ModifyRoyaltyStatusMapper;
import com.crm.model.entity.returnMoney.ModifyRoyaltyStatus;
import com.crm.model.qo.returnMoney.ModifyRoyaltyStatusQO;
import com.crm.model.vo.returnMoney.ModifyRoyaltyStatusVO;
import com.crm.service.returnMoney.ModifyRoyaltyStatusDbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ Author ：pym
 * @ Date   ：2021/11/25 14:43
 */
@Service
public class ModifyRoyaltyStatusDbServiceImpl implements ModifyRoyaltyStatusDbService {
    @Autowired
    private ModifyRoyaltyStatusMapper modifyRoyaltyStatusMapper;

    @Autowired
    private ModifyRoyaltyStatusCustomMapper modifyRoyaltyStatusCustomMapper;

    /**
     * 新增修改回款提成发放状态记录
     * @Author pym
     * @Date  2021/11/25 14:51
     * @param modifyRoyaltyStatus 修改回款提成发放状态记录
     * @return {@link {java.lang.Boolean}}
     */
    @Override
    public Boolean insertModifyRoyaltyStatus(ModifyRoyaltyStatus modifyRoyaltyStatus) {
        return modifyRoyaltyStatusMapper.insertSelective(modifyRoyaltyStatus) > 0;
    }

    /**
     * 财务 - 回款管理 - 到款记录 - “修改回款提成发放状态”列表
     * @Author pym
     * @Date  2021/11/26 14:49
     * @param order 排序
     * @param modifyRoyaltyStatusQO 筛选条件
     * @return {@link {java.util.List<com.crm.model.vo.returnMoney.ModifyRoyaltyStatusVO>}}
     */
    @Override
    public List<ModifyRoyaltyStatusVO> selectModifyRoyaltyStatusList(String order, ModifyRoyaltyStatusQO modifyRoyaltyStatusQO) {
        return modifyRoyaltyStatusCustomMapper.selectModifyRoyaltyStatusList(order, modifyRoyaltyStatusQO);
    }
}
